using UnityEngine;
using UnityEngine.UI;

public class HomePseudo : MonoBehaviour
{
	public Text pseudoField;
	public string[] pseudos;
	public void SetPseudo(string pseudo)
	{
		pseudoField.text = pseudo;
        PlayerData.Instance.Pseudo = pseudo;
        PlayerData.Instance.SaveData();
    }

	public void SetColor(Color color)
	{
        pseudoField.color = color;
		//pseudoField.textComponent.color = color;
	}
    public void Start()
    {
        pseudoField.text=PlayerData.Instance.Pseudo;
        int num = Random.Range(0, pseudos.Length-1);
        SetPseudo(pseudos[num]);
    }
    //public void CALLBACK_EVENT_OnChangePseudo(string newPseudo)
    //{
    //	if (string.IsNullOrEmpty(newPseudo))
    //	{
    //		pseudoField.text = PlayerData.Instance.Pseudo;
    //		return;
    //	}
    //	PlayerData.Instance.Pseudo = newPseudo;
    //	PlayerData.Instance.SaveData();
    //}
}
